package org.example.examsystem.mapper;



import org.example.examsystem.entity.Subject ;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

@Mapper
public interface SubjectMapper {
    List<Subject> getQuestionsByPage(int offset, int size, int stype);
    int getTotalCount(int stype);
    void insertQuestion(Subject subject);
    void updateQuestion(Subject subject);
    void deleteQuestion(int sid);
    void batchDeleteQuestions(List<Integer> ids);
    List<Subject> getRandomSubjects(int cno, int stype, int count);
    Subject getSubjectById(int sid);
    List<Subject> getQuestionsByPageWithCname(int offset, int size, int stype);

}
